package FirstChapter.three;

import API.Stack.FixedCapacityStack;

import java.util.Scanner;

/**
 * Created by Lee on 2017/2/16 0016.
 */
public class FixedCapacityStackTest {
    public static void main(String[] args) {
        FixedCapacityStack<String> s;
        s = new FixedCapacityStack<String>(100);
        Scanner scanner = new Scanner(System.in);
        System.out.println(s.isEmpty());
        while (true) {
            String tmp = scanner.next();
            if (tmp.equals("!"))
                break;
            s.push(tmp);

        }
        System.out.print(s.size()+"   "+s.pop());
    }
}
